package cn.bdqn.exception;

import cn.bdqn.result.ExceptionEnum;

//自定义的异常处理器，继承父类RuntimeException
public class IsException extends RuntimeException  {
	
	private Integer code;  //状态码

	public IsException(ExceptionEnum exceptionEnum) {
		//继承了父类的message属性，而值被枚举类自己写的message和code替代
		super(exceptionEnum.getMessage());  
		this.code = exceptionEnum.getCode();
	}
	
	public Integer getCode() {
		return code;
	}
	

}
